function Tab(tab_title1,tab_content1,current1,div_className1) {
if(!document.getElementById) return false;
var tab_title = tab_title1; //选项卡容器id
var tab_content = tab_content1;//内容层的父容器id
var current = current1;//选项卡当前项class名称
var div_className = div_className1;//承载内容的层的class属性名称
var menu = document.getElementById(tab_title).getElementsByTagName('li');
var main = document.getElementById(tab_content).getElementsByTagName('div');
var acont = new Array();

var j=0;
////本循环用来提取各个选项卡的显示内容区div
    for (var i = 0; i < main.length; i++) {
        if( main[i].className == div_className ){
        acont[j] = main[i];
        j++;
            }
        }
////为每个选项卡的标题来设置当前属性
    for (var k = 0; k< menu.length; k++) {
        (function(k){
         menu[k].onclick = function(){
           
           for(var n=0;n<menu.length;n++){
                menu[n].className="";
                }
            this.className = current; 
            for(var num = 0; num<acont.length; num++){
                acont[num].style.display = "none";
            }
        
            acont[k].style.display = "block";
          };
})(k);
    }

}
